library(dplyr)
price_sale<-tabln.vec$ha_price%>%filter(proptype==pty)%>%
    dplyr::select(one_of(c('ymid','ha_code','saleprice','salebldgarea','year','month')))%>%
    na.omit
# phase<-tabln.vec$ha_phase%>%
#     filter(!is.na(buildyear))%>%
#     group_by(ha_code)%>%
#     summarise(buildyear=round(mean(buildyear)))%>%as.data.frame

#关联phase数据
# pp_sale<-merge(price_sale,phase,by='ha_code',all.x=TRUE)
#关联POI与info数据
ppi_sale<-merge(price_sale,ha_info.sp,by='ha_code')